/*
 * @Description: 
 * @Author: xunzhaotech
 * @Email: luyb@xunzhaotech.com
 * @QQ: 1525572900
 * @Date: 2025-03-05 13:41:52
 * @LastEditTime: 2025-03-25 08:01:30
 * @LastEditors: xunzhaotech
 */
import request from '@/config/axios'

// ERP 客户回访计划 VO
export interface CustomerFollowUpPlanVO {
  id: number // 计划编号
  name: string // 名称
  customerId: string // 客户名称
  firstTime: string // 第一次回访时间
  lastTime: string // 第一次回访时间
  principal: string // 负责人
}

// ERP 客户回访计划 API
export const CustomerFollowUpPlanApi = {
  // 查询ERP 客户回访计划分页
  getCustomerFollowUpPlanPage: async (params: any) => {
    return await request.get({ url: `/erp/customer-follow-up-plan/page`, params })
  },

  // 查询ERP 客户回访计划详情
  getCustomerFollowUpPlan: async (id: number) => {
    return await request.get({ url: `/erp/customer-follow-up-plan/get?id=` + id })
  },

  // 新增ERP 客户回访计划
  createCustomerFollowUpPlan: async (data: CustomerFollowUpPlanVO) => {
    return await request.post({ url: `/erp/customer-follow-up-plan/create`, data })
  },

  // 修改ERP 客户回访计划
  updateCustomerFollowUpPlan: async (data: CustomerFollowUpPlanVO) => {
    return await request.put({ url: `/erp/customer-follow-up-plan/update`, data })
  },

  // 删除ERP 客户回访计划
  deleteCustomerFollowUpPlan: async (id: number) => {
    return await request.delete({ url: `/erp/customer-follow-up-plan/delete?id=` + id })
  },

  // 导出ERP 客户回访计划 Excel
  exportCustomerFollowUpPlan: async (params) => {
    return await request.download({ url: `/erp/customer/export-excel-data`, params })
  }
}
